<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: Emergency</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__CO__Emergency.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Emergency<div class="ingroups"><a class="el" href="group__CO__CANopen__301.html">CANopen_301</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>CANopen Emergency protocol.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__CO__EM__errorCodes"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__EM__errorCodes.html">CANopen Error codes</a></td></tr>
<tr class="memdesc:group__CO__EM__errorCodes"><td class="mdescLeft">&#160;</td><td class="mdescRight">Standard error codes according to CiA DS-301 and DS-401. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__CO__EM__errorStatusBits"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__EM__errorStatusBits.html">Error status bits</a></td></tr>
<tr class="memdesc:group__CO__EM__errorStatusBits"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal indication of the error condition. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__Emergency_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__Emergency_8h.html">CO_Emergency.h</a></td></tr>
<tr class="memdesc:CO__Emergency_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Emergency protocol. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__EM__t.html">CO_EM_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Emergerncy object for <a class="el" href="group__CO__Emergency.html#ga9c9b7258698aadf6e9365bc0d1324be8" title="Report error condition. ">CO_errorReport()</a>.  <a href="structCO__EM__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__EMpr__t.html">CO_EMpr_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error control and Emergency object.  <a href="structCO__EMpr__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gaddb92fe676778143052bc7149399ecf5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#gaddb92fe676778143052bc7149399ecf5">CO_EM_INTERNAL_BUFFER_SIZE</a>&#160;&#160;&#160;10</td></tr>
<tr class="memdesc:gaddb92fe676778143052bc7149399ecf5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of internal buffer, whwre emergencies are stored after <a class="el" href="group__CO__Emergency.html#ga9c9b7258698aadf6e9365bc0d1324be8" title="Report error condition. ">CO_errorReport()</a>.  <a href="#gaddb92fe676778143052bc7149399ecf5">More...</a><br /></td></tr>
<tr class="separator:gaddb92fe676778143052bc7149399ecf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1aac3d1d9893423e8f3c99a9a6d572f4"><td class="memItemLeft" align="right" valign="top"><a id="ga1aac3d1d9893423e8f3c99a9a6d572f4"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga1aac3d1d9893423e8f3c99a9a6d572f4">CO_SDO_SERVER_H</a></td></tr>
<tr class="memdesc:ga1aac3d1d9893423e8f3c99a9a6d572f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Skip section, if <a class="el" href="CO__SDOserver_8h.html" title="CANopen Service Data Object - server protocol. ">CO_SDOserver.h</a> is not included. <br /></td></tr>
<tr class="separator:ga1aac3d1d9893423e8f3c99a9a6d572f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga333f4f23b66f419418c06c33ed46ebbd"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga333f4f23b66f419418c06c33ed46ebbd">CO_errorRegisterBitmask_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga333f4f23b66f419418c06c33ed46ebbda92a7e121ae04a022fc2fe604eb1c148e">CO_ERR_REG_GENERIC_ERR</a> = 0x01U, 
<a class="el" href="group__CO__Emergency.html#gga333f4f23b66f419418c06c33ed46ebbda61eded29fb0fcd95b2f66c2682de0f2b">CO_ERR_REG_CURRENT</a> = 0x02U, 
<a class="el" href="group__CO__Emergency.html#gga333f4f23b66f419418c06c33ed46ebbda360c75e04303d1c55e2bc8528407cb87">CO_ERR_REG_VOLTAGE</a> = 0x04U, 
<a class="el" href="group__CO__Emergency.html#gga333f4f23b66f419418c06c33ed46ebbdab12f2b419af0aeb8aae83a13d5c8b7bf">CO_ERR_REG_TEMPERATURE</a> = 0x08U, 
<br />
&#160;&#160;<a class="el" href="group__CO__Emergency.html#gga333f4f23b66f419418c06c33ed46ebbda479548aa5b1d40c6ef0e221a244301bb">CO_ERR_REG_COMM_ERR</a> = 0x10U, 
<a class="el" href="group__CO__Emergency.html#gga333f4f23b66f419418c06c33ed46ebbdab137d1705e9ab20e2caeb22f57dd4716">CO_ERR_REG_DEV_PROFILE</a> = 0x20U, 
<a class="el" href="group__CO__Emergency.html#gga333f4f23b66f419418c06c33ed46ebbdaffdf7f5d9f9ae52fa1bf97a3fb3d848b">CO_ERR_REG_RESERVED</a> = 0x40U, 
<a class="el" href="group__CO__Emergency.html#gga333f4f23b66f419418c06c33ed46ebbda207eee1d9638f61166bc395ee71b84a3">CO_ERR_REG_MANUFACTURER</a> = 0x80U
<br />
 }<tr class="memdesc:ga333f4f23b66f419418c06c33ed46ebbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Error register.  <a href="group__CO__Emergency.html#ga333f4f23b66f419418c06c33ed46ebbd">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga333f4f23b66f419418c06c33ed46ebbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga9c9b7258698aadf6e9365bc0d1324be8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga9c9b7258698aadf6e9365bc0d1324be8">CO_errorReport</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorBit, const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> errorCode, const <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> infoCode)</td></tr>
<tr class="memdesc:ga9c9b7258698aadf6e9365bc0d1324be8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Report error condition.  <a href="#ga9c9b7258698aadf6e9365bc0d1324be8">More...</a><br /></td></tr>
<tr class="separator:ga9c9b7258698aadf6e9365bc0d1324be8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga14947a08d1c68446ee3356f00159174f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga14947a08d1c68446ee3356f00159174f">CO_errorReset</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorBit, const <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> infoCode)</td></tr>
<tr class="memdesc:ga14947a08d1c68446ee3356f00159174f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset error condition.  <a href="#ga14947a08d1c68446ee3356f00159174f">More...</a><br /></td></tr>
<tr class="separator:ga14947a08d1c68446ee3356f00159174f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0f165b478424ddb872dfdfafc9bcfdd0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga0f165b478424ddb872dfdfafc9bcfdd0">CO_isError</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorBit)</td></tr>
<tr class="memdesc:ga0f165b478424ddb872dfdfafc9bcfdd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check specific error condition.  <a href="#ga0f165b478424ddb872dfdfafc9bcfdd0">More...</a><br /></td></tr>
<tr class="separator:ga0f165b478424ddb872dfdfafc9bcfdd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d833d23c88bca06ac52094f1a521e41"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga7d833d23c88bca06ac52094f1a521e41">CO_EM_init</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, <a class="el" href="structCO__EMpr__t.html">CO_EMpr_t</a> *emPr, <a class="el" href="structCO__SDO__t.html">CO_SDO_t</a> *SDO, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *errorStatusBits, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorStatusBitsSize, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *errorRegister, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *preDefErr, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> preDefErrSize, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevRx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevRxIdx, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevTx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevTxIdx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANidTxEM)</td></tr>
<tr class="memdesc:ga7d833d23c88bca06ac52094f1a521e41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Error control and Emergency object.  <a href="#ga7d833d23c88bca06ac52094f1a521e41">More...</a><br /></td></tr>
<tr class="separator:ga7d833d23c88bca06ac52094f1a521e41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga94efd78032de3667e2a89780b08aabed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga94efd78032de3667e2a89780b08aabed">CO_EM_initCallbackPre</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, void *object, void(*pFunctSignal)(void *object))</td></tr>
<tr class="memdesc:ga94efd78032de3667e2a89780b08aabed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Emergency callback function.  <a href="#ga94efd78032de3667e2a89780b08aabed">More...</a><br /></td></tr>
<tr class="separator:ga94efd78032de3667e2a89780b08aabed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga583245c954327c3cf7f9fdb97854e76b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#ga583245c954327c3cf7f9fdb97854e76b">CO_EM_initCallbackRx</a> (<a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, void(*pFunctSignalRx)(const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> ident, const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> errorCode, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorRegister, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorBit, const <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> infoCode))</td></tr>
<tr class="memdesc:ga583245c954327c3cf7f9fdb97854e76b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Emergency received callback function.  <a href="#ga583245c954327c3cf7f9fdb97854e76b">More...</a><br /></td></tr>
<tr class="separator:ga583245c954327c3cf7f9fdb97854e76b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa18d7bb809b9a0f0a3104664dc56a1c4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__Emergency.html#gaa18d7bb809b9a0f0a3104664dc56a1c4">CO_EM_process</a> (<a class="el" href="structCO__EMpr__t.html">CO_EMpr_t</a> *emPr, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> NMTisPreOrOperational, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> emInhTime, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:gaa18d7bb809b9a0f0a3104664dc56a1c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process Error control and Emergency object.  <a href="#gaa18d7bb809b9a0f0a3104664dc56a1c4">More...</a><br /></td></tr>
<tr class="separator:gaa18d7bb809b9a0f0a3104664dc56a1c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>CANopen Emergency protocol. </p>
<p>Error control and Emergency is used for control internal error state and for sending a CANopen Emergency message.</p>
<p>In case of error condition stack or application calls <a class="el" href="group__CO__Emergency.html#ga9c9b7258698aadf6e9365bc0d1324be8" title="Report error condition. ">CO_errorReport()</a> function with indication of the error. Specific error condition is reported (with CANopen Emergency message) only the first time after it occurs. Internal state of the error condition is controlled with <a class="el" href="group__CO__EM__errorStatusBits.html">Error status bits</a>. Specific error condition can also be reset by <a class="el" href="group__CO__Emergency.html#ga14947a08d1c68446ee3356f00159174f" title="Reset error condition. ">CO_errorReset()</a> function. If so, Emergency message is sent with CO_EM_NO_ERROR indication.</p>
<p>Some error conditions are informative and some are critical. Critical error conditions sets the <a class="el" href="group__CO__Emergency.html#ga333f4f23b66f419418c06c33ed46ebbd" title="CANopen Error register. ">CO_errorRegisterBitmask_t</a>.</p>
<p>Latest errors can be read from <em>Pre Defined Error Field</em> (object dictionary, index 0x1003). <a class="el" href="group__CO__EM__errorStatusBits.html">Error status bits</a> can also be read form CANopen object dictionary.</p>
<h3>Emergency message contents:</h3>
<table class="doxtable">
<tr>
<th>Byte </th><th>Description  </th></tr>
<tr>
<td>0..1 </td><td><a class="el" href="group__CO__EM__errorCodes.html">CANopen Error codes</a>. </td></tr>
<tr>
<td>2 </td><td><a class="el" href="group__CO__Emergency.html#ga333f4f23b66f419418c06c33ed46ebbd" title="CANopen Error register. ">CO_errorRegisterBitmask_t</a>. </td></tr>
<tr>
<td>3 </td><td>Index of error condition (see <a class="el" href="group__CO__EM__errorStatusBits.html">Error status bits</a>). </td></tr>
<tr>
<td>4..7 </td><td>Additional argument informative to <a class="el" href="group__CO__Emergency.html#ga9c9b7258698aadf6e9365bc0d1324be8" title="Report error condition. ">CO_errorReport()</a> function. </td></tr>
</table>
<h4>Contents of <em>Pre Defined Error Field</em> (object dictionary, index 0x1003):</h4>
<p>bytes 0..3 are equal to bytes 0..3 in the Emergency message.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__CO__driver.html#ga01dd35ae53fd2209ceccabdc8bf8dd06" title="Default CANopen identifiers. ">CO_Default_CAN_ID_t</a> </dd></dl>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="gaddb92fe676778143052bc7149399ecf5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaddb92fe676778143052bc7149399ecf5">&#9670;&nbsp;</a></span>CO_EM_INTERNAL_BUFFER_SIZE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CO_EM_INTERNAL_BUFFER_SIZE&#160;&#160;&#160;10</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Size of internal buffer, whwre emergencies are stored after <a class="el" href="group__CO__Emergency.html#ga9c9b7258698aadf6e9365bc0d1324be8" title="Report error condition. ">CO_errorReport()</a>. </p>
<p>Buffer is cleared by <a class="el" href="group__CO__Emergency.html#gaa18d7bb809b9a0f0a3104664dc56a1c4" title="Process Error control and Emergency object. ">CO_EM_process()</a>. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga333f4f23b66f419418c06c33ed46ebbd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga333f4f23b66f419418c06c33ed46ebbd">&#9670;&nbsp;</a></span>CO_errorRegisterBitmask_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__Emergency.html#ga333f4f23b66f419418c06c33ed46ebbd">CO_errorRegisterBitmask_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>CANopen Error register. </p>
<p>In object dictionary on index 0x1001.</p>
<p>Error register is calculated from critical internal <a class="el" href="group__CO__EM__errorStatusBits.html">Error status bits</a>. Generic and communication bits are calculated in CO_EM_process function, device profile or manufacturer specific bits may be calculated inside the application.</p>
<p>Internal errors may prevent device to stay in NMT Operational state. Details are described in <em>Error Behavior</em> object in Object Dictionary at index 0x1029. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga333f4f23b66f419418c06c33ed46ebbda92a7e121ae04a022fc2fe604eb1c148e"></a>CO_ERR_REG_GENERIC_ERR&#160;</td><td class="fielddoc"><p>bit 0, generic error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga333f4f23b66f419418c06c33ed46ebbda61eded29fb0fcd95b2f66c2682de0f2b"></a>CO_ERR_REG_CURRENT&#160;</td><td class="fielddoc"><p>bit 1, current </p>
</td></tr>
<tr><td class="fieldname"><a id="gga333f4f23b66f419418c06c33ed46ebbda360c75e04303d1c55e2bc8528407cb87"></a>CO_ERR_REG_VOLTAGE&#160;</td><td class="fielddoc"><p>bit 2, voltage </p>
</td></tr>
<tr><td class="fieldname"><a id="gga333f4f23b66f419418c06c33ed46ebbdab12f2b419af0aeb8aae83a13d5c8b7bf"></a>CO_ERR_REG_TEMPERATURE&#160;</td><td class="fielddoc"><p>bit 3, temperature </p>
</td></tr>
<tr><td class="fieldname"><a id="gga333f4f23b66f419418c06c33ed46ebbda479548aa5b1d40c6ef0e221a244301bb"></a>CO_ERR_REG_COMM_ERR&#160;</td><td class="fielddoc"><p>bit 4, communication error (overrun, error state) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga333f4f23b66f419418c06c33ed46ebbdab137d1705e9ab20e2caeb22f57dd4716"></a>CO_ERR_REG_DEV_PROFILE&#160;</td><td class="fielddoc"><p>bit 5, device profile specific </p>
</td></tr>
<tr><td class="fieldname"><a id="gga333f4f23b66f419418c06c33ed46ebbdaffdf7f5d9f9ae52fa1bf97a3fb3d848b"></a>CO_ERR_REG_RESERVED&#160;</td><td class="fielddoc"><p>bit 6, reserved (always 0) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga333f4f23b66f419418c06c33ed46ebbda207eee1d9638f61166bc395ee71b84a3"></a>CO_ERR_REG_MANUFACTURER&#160;</td><td class="fielddoc"><p>bit 7, manufacturer specific </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7d833d23c88bca06ac52094f1a521e41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7d833d23c88bca06ac52094f1a521e41">&#9670;&nbsp;</a></span>CO_EM_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_EM_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__EMpr__t.html">CO_EMpr_t</a> *&#160;</td>
          <td class="paramname"><em>emPr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__SDO__t.html">CO_SDO_t</a> *&#160;</td>
          <td class="paramname"><em>SDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>errorStatusBits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>errorStatusBitsSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>errorRegister</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>preDefErr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>preDefErrSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevRx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevRxIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevTx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevTxIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANidTxEM</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Error control and Emergency object. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">emPr</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">em</td><td>Emergency object defined separately. Will be included in emPr and initialized too. </td></tr>
    <tr><td class="paramname">SDO</td><td>SDO server object. </td></tr>
    <tr><td class="paramname">errorStatusBits</td><td>Pointer to <em>Error Status Bits</em> array from Object Dictionary (manufacturer specific section). See <a class="el" href="group__CO__EM__errorStatusBits.html">Error status bits</a>. </td></tr>
    <tr><td class="paramname">errorStatusBitsSize</td><td>Total size of the above array. Must be &gt;= 6. </td></tr>
    <tr><td class="paramname">errorRegister</td><td>Pointer to <em>Error Register</em> (Object dictionary, index 0x1001). </td></tr>
    <tr><td class="paramname">preDefErr</td><td>Pointer to <em>Pre defined error field</em> array from Object dictionary, index 0x1003. </td></tr>
    <tr><td class="paramname">preDefErrSize</td><td>Size of the above array. </td></tr>
    <tr><td class="paramname">CANdevRx</td><td>CAN device for Emergency reception. </td></tr>
    <tr><td class="paramname">CANdevRxIdx</td><td>Index of receive buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">CANdevTx</td><td>CAN device for Emergency transmission. </td></tr>
    <tr><td class="paramname">CANdevTxIdx</td><td>Index of transmit buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">CANidTxEM</td><td>CAN identifier for Emergency message.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions. ">CO_ReturnError_t</a> CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT. </dd></dl>

</div>
</div>
<a id="ga94efd78032de3667e2a89780b08aabed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga94efd78032de3667e2a89780b08aabed">&#9670;&nbsp;</a></span>CO_EM_initCallbackPre()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_EM_initCallbackPre </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Emergency callback function. </p>
<p>Function initializes optional callback function, which should immediately start processing of <a class="el" href="group__CO__Emergency.html#gaa18d7bb809b9a0f0a3104664dc56a1c4" title="Process Error control and Emergency object. ">CO_EM_process()</a> function. Callback is called from <a class="el" href="group__CO__Emergency.html#ga9c9b7258698aadf6e9365bc0d1324be8" title="Report error condition. ">CO_errorReport()</a> or <a class="el" href="group__CO__Emergency.html#ga14947a08d1c68446ee3356f00159174f" title="Reset error condition. ">CO_errorReset()</a> function. Those functions are fast and may be called from any thread. Callback should immediately start mainline thread, which calls <a class="el" href="group__CO__Emergency.html#gaa18d7bb809b9a0f0a3104664dc56a1c4" title="Process Error control and Emergency object. ">CO_EM_process()</a> function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>This object. </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignal(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignal</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga583245c954327c3cf7f9fdb97854e76b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga583245c954327c3cf7f9fdb97854e76b">&#9670;&nbsp;</a></span>CO_EM_initCallbackRx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_EM_initCallbackRx </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> ident, const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> errorCode, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorRegister, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorBit, const <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> infoCode)&#160;</td>
          <td class="paramname"><em>pFunctSignalRx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Emergency received callback function. </p>
<p>Function initializes optional callback function, which executes after error condition is received.</p>
<p><em>ident</em> argument from callback contains CAN-ID of the emergency message. If <em>ident</em> == 0, then emergency message was sent from this device.</p>
<dl class="section remark"><dt>Remarks</dt><dd>Depending on the CAN driver implementation, this function is called inside an ISR or inside a mainline. Must be thread safe.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>This object. </td></tr>
    <tr><td class="paramname">pFunctSignalRx</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa18d7bb809b9a0f0a3104664dc56a1c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa18d7bb809b9a0f0a3104664dc56a1c4">&#9670;&nbsp;</a></span>CO_EM_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_EM_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EMpr__t.html">CO_EMpr_t</a> *&#160;</td>
          <td class="paramname"><em>emPr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>NMTisPreOrOperational</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>emInhTime</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process Error control and Emergency object. </p>
<p>Function must be called cyclically. It verifies some communication errors, calculates bit 0 and bit 4 from <em>Error register</em> and sends emergency message if necessary.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">emPr</td><td>This object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">NMTisPreOrOperational</td><td>True if this node is NMT_PRE_OPERATIONAL or NMT_OPERATIONAL. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in [microseconds]. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">emInhTime</td><td><em>Inhibit time EMCY</em> in [100*us] (object dictionary, index 0x1015). </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - see <a class="el" href="group__CO__CANopen.html#ga7a36da54b801074032622708e06a742e" title="Process CANopen objects. ">CO_process()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga9c9b7258698aadf6e9365bc0d1324be8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9c9b7258698aadf6e9365bc0d1324be8">&#9670;&nbsp;</a></span>CO_errorReport()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_errorReport </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>errorBit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>errorCode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>infoCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Report error condition. </p>
<p>Function is called on any error condition inside CANopen stack and may also be called by application on custom error condition. Emergency message is sent after the first occurance of specific error. In case of critical error, device will not be able to stay in NMT_OPERATIONAL state.</p>
<p>Function is short and may be used form any task or interrupt.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>Emergency object. </td></tr>
    <tr><td class="paramname">errorBit</td><td>from <a class="el" href="group__CO__EM__errorStatusBits.html">Error status bits</a>. </td></tr>
    <tr><td class="paramname">errorCode</td><td>from <a class="el" href="group__CO__EM__errorCodes.html">CANopen Error codes</a>. </td></tr>
    <tr><td class="paramname">infoCode</td><td>32 bit value is passed to bytes 4...7 of the Emergency message. It contains optional additional information inside emergency message. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga14947a08d1c68446ee3356f00159174f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga14947a08d1c68446ee3356f00159174f">&#9670;&nbsp;</a></span>CO_errorReset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_errorReset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>errorBit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>infoCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reset error condition. </p>
<p>Function is called if any error condition is solved. Emergency message is sent with <a class="el" href="group__CO__EM__errorCodes.html">CANopen Error codes</a> 0x0000.</p>
<p>Function is short and may be used form any task or interrupt.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>Emergency object. </td></tr>
    <tr><td class="paramname">errorBit</td><td>from <a class="el" href="group__CO__EM__errorStatusBits.html">Error status bits</a>. </td></tr>
    <tr><td class="paramname">infoCode</td><td>32 bit value is passed to bytes 4...7 of the Emergency message. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga0f165b478424ddb872dfdfafc9bcfdd0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0f165b478424ddb872dfdfafc9bcfdd0">&#9670;&nbsp;</a></span>CO_isError()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> CO_isError </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>errorBit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check specific error condition. </p>
<p>Function returns 1, if specific internal error is present. Otherwise it returns 0.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">em</td><td>Emergency object. </td></tr>
    <tr><td class="paramname">errorBit</td><td>from <a class="el" href="group__CO__EM__errorStatusBits.html">Error status bits</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>false: Error is not present. </dd>
<dd>
true: Error is present. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Tue Jun 9 2020 17:29:32 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
